#pragma once
#include <cstddef>
#include <string>
#include <odb/core.hxx>
#include <boost/date_time/posix_time/posix_time.hpp>

namespace entity {

#pragma db object table("chat_session_member")
class ChatSessionMember 
{
public:
    ChatSessionMember() {}
    ChatSessionMember(const std::string& sessionId, const std::string& userId)
        : sessionId_(sessionId), userId_(userId) {}

    void setSessionId(const std::string& val) { sessionId_ = val; }
    std::string sessionId() const { return sessionId_; }

    void setUserId(const std::string& val) { userId_ = val; }
    std::string userId() const { return userId_; }

private:
    friend class odb::access; 
    
    #pragma db id auto
    uint32_t id_;

    #pragma db column("session_id") type("varchar(32)") index 
    std::string sessionId_;

    #pragma db column("user_id") type("varchar(32)")
    std::string userId_;
};

}

// odb -d mysql --std c++11 --generate-query --generate-schema --profile boost/date-time chat_session_menber.hxx